package utils

import (
	"strconv"
	"time"
)

// @time        2022/05/10
// @author      mz100
// @description 日期字符串 转 time格式
// @param
// @return
func GetTimeParseDate(t string) time.Time {
	local, _ := time.LoadLocation("Asia/Shanghai")
	showTime, _ := time.ParseInLocation("2006-01-02", t, local)
	return showTime
}

// @time        2022/05/10
// @author      mz100
// @description 数字型字符串数组转数字数组
// @param
// @return
func StringsToInts(s []string) []int {
	i := make([]int, len(s))
	for index, value := range s {
		i[index], _ = strconv.Atoi(value)
	}
	return i
}
